<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
   /*function add(a,b){
       return a + b;
   }


   var result = add(1,2);

   alert(result);*/

   var add = function (a,b){
       return a + b;
   }

   var result = add(1,2);

   var result1 = add(1,2,3);
   // alert(result1)

   var result2 = add(1);
   alert(result2);

   //alert(result);

</script>
</body>
</html>